package com.qxkj.id.restgen.service;

import com.qxkj.id.restgen.common.Id;

import java.util.Date;

/**
 * Copyright © 2018年 ziniuxiaozhu. All rights reserved.
 *
 * @Author 临江仙 hzqiuxm@163.com
 * TODO:亲爱的临江仙，请写点注释吧...........
 * @Date 2018/9/18 14:47
 */
public interface IdService {

    /**
     * 生成一个id
     * @return
     */
    public long genId();

    /**
     *
     * @param id
     * @return
     */
    public Id expId(long id);

    /**
     *
     * @param time
     * @param seq
     * @return
     */
    public long makeId(long time, long seq);

    /**
     *
     * @param time
     * @param seq
     * @param machine
     * @return
     */
    public long makeId(long time, long seq, long machine);

    /**
     *
     * @param genMethod
     * @param time
     * @param seq
     * @param machine
     * @return
     */
    public long makeId(long genMethod, long time, long seq, long machine);

    /**
     *
     * @param type
     * @param genMethod
     * @param time
     * @param seq
     * @param machine
     * @return
     */
    public long makeId(long type, long genMethod, long time,
                       long seq, long machine);

    /**
     *
     * @param version
     * @param type
     * @param genMethod
     * @param time
     * @param seq
     * @param machine
     * @return
     */
    public long makeId(long version, long type, long genMethod,
                       long time, long seq, long machine);

    /**
     *
     * @param time
     * @return
     */
    public Date transTime(long time);
}
